package com.company.cloud.product.modules.mgr.controller.resp;

import java.util.List;

import org.springframework.util.StringUtils;

import com.company.cloud.common.utils.StrSplitUtils;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class SpecificationModel {

	@ApiModelProperty(value = "ID")
	private Integer id;

	@ApiModelProperty(value = "名称")
	private String name;

	@ApiModelProperty(value = "可选项")
	private List<String> options;
	
	public SpecificationModel() {
		
	}
	
	public SpecificationModel(Integer id,String name,String options) {
		this.id=id;
		this.name=name;
		if(StringUtils.hasText(options)) {
			this.options=StrSplitUtils.parse2list(options, String.class);
		}
	}

}
